home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nikkei Mac 20
/
NIKKEI-MAC-CD-VOL-20-1998-12.ISO.7z
/
NIKKEI-MAC-CD-VOL-20-1998-12.ISO
/
デモソフトライブラリー
/
日本テレコムODNスターターキット
/
Internet Setup
/
Modem Scripts
/
HUCOM TA64H_V110
/
HUCOM TA64H_V110
next >
Wrap
Text File
|
1997-05-24
|
7KB
|
365 lines
! TA64H V110 Mode CCL File for PPP & ARA 2.1J
! Created by kan Kobayashi , HUCOM Inc. in Nov 1996.
!
! 'mlts' resource info for this TA:
! byte 1 == 01 -> modem HAS builtin reliability protocols
! byte 2 == 00 -> reserved by Apple
! byte 3 == 36 -> max hex chars in varstr 7 (54 dec)
! byte 4 == 36 -> max hex chars in varstr 8
! byte 5 == 36 -> max hex chars in varstr 9
!
@ORIGINATE
@ANSWER
!
! ---- Initial modem setup ----
!
! Set serial port speed depending upon the compression flag
! A higher rate with compression on to handle expanded data from the modem
! A lower rate closer to the DCE when compression is off
!
ifstr 5 1 "0"
serreset 115200, 0, 8, 1
! reset the serial port
HSReset 0 0 0 0 0 0
settries 0
jump 2
!
@LABEL 1
serreset 115200, 0, 8, 1
! reset the serial port
HSReset 0 0 0 0 0 0
settries 0
!
@LABEL 2
matchclr
matchstr 1 3 "OK¥13¥10"
! &F1 - V110 Mode
! W2 - Connect result code reports DCE speed
! %A4=0 - Dont't show infomation for calling charge.
! S0=0 - Don't answer calls
! E0 - Turn command echo off
write "AT&F1W2%A4=0S0=0E0¥13"
matchread 30
inctries
iftries 2 71
!
! Reset the Modem
!
DTRSet
pause 5
DTRClear
pause 5
DTRSet
flush
jump 2
!
@LABEL 3
! Modem responding & configured.
! determine if reliable link is requested.
!
! if modem mnp10 link requested (var 4 == 2) then jump label 4
ifstr 4 4 "2"
!
! if modem v42 link requested (var 4 == 1) then jump label 5
ifstr 4 5 "1"
!
! if no modem v42 link requested (var 4 == 0) [same as ARA 1.0] then jump label 9
ifstr 4 9 "0"
!
! else invalid value in var 4; exit w/error
jump 76
!
@LABEL 4
! yes, MNP10 link is requested. OK for MNP10 -> MNP4 -> normal mode
!
@LABEL 5
! yes, v42 link is requested. OK for LAP-M -> MNP4 -> normal mode.
!
@LABEL 7
! if we DID want v42b in the modem, this is where it would go,
! but since the cpu does a better job at compressing compressable
! files, this setup stuff is commented out. the matchstrings and
! associated labels have been left in.
!
@LABEL 9
! If speaker on flag is true, jump to label 13. Else turn off the speaker.
!
! modem ready, so enable answering or originate a call - label range is 11-30
!
@LABEL 13
pause 5
ifANSWER 62
!
! if normal dialing (parm 6 == 0) jump to 19
ifstr 6 19 "0"
!
! if blind dialing (parm 6 == 1) jump to 17
ifstr 6 17 "1"
!
! if manual dialing (parm 6 == 2) jump to 15
ifstr 6 15 "2"
!
! else invalid value in var 6; exit w/error
jump 76
!
@label 15
note "このTAは、手動ダイアルできません。" 3
!note "Cannot Manual dialing with this TA." 3
! OutPut Error Message and Exit
jump 73
!
@label 17
!
@label 19
! this is where we break up long dialstrings
!
! parm 1 is always the full dialstring from the conn doc
note "^1 をダイアル中。" 3
!note "Dialing ^1" 3
! parm 3 is always "p" for pulse & "t" for tone
!
! if parm 8 == blank (complete dialstring in parm 7)
! then jump to label 27 & dial parm 7
ifstr 8 27 " "
!
! if parm 9 == blank (complete dialstring in parms 7 & 8)
! then jump to label 24 & dial parm 7 & 8
ifstr 9 24 " "
!
! else dial parm 7 & 8 & 9 (complete dialstring in parms 7, 8 & 9)
@label 22
write "ATD^7^8^9¥13"
jump 32
!
@label 24
write "ATD^7^8¥13"
jump 32
!
@label 27
write "ATD^7¥13"
jump 32
!
! connecting - label range is 31-60
!
@LABEL 32
matchclr
!
matchstr 1 34 "CONNECT 300¥13¥10"
matchstr 2 35 "CONNECT 600¥13¥10"
matchstr 3 36 "CONNECT 1200¥13¥10"
matchstr 4 37 "CONNECT 2400¥13¥10"
matchstr 5 38 "CONNECT 4800¥13¥10"
matchstr 6 39 "CONNECT 9600¥13¥10"
matchstr 7 40 "CONNECT 19200¥13¥10"
matchstr 8 41 "CONNECT 38400¥13¥10"
!
matchstr 14 68 "RING¥13¥10"
matchstr 16 73 "NO CARRIER¥13¥10"
matchstr 17 73 "ERROR¥13¥10"
matchstr 18 74 "BUSY¥13¥10"
matchstr 19 75 "NO ANSWER¥13¥10"
matchstr 20 77 "DELAYED¥13¥10"
matchstr 21 78 "BLACKLISTED¥13¥10"
!
matchread 700
ifANSWER 32
jump 71
!
!
@LABEL 34
jump 98
!
@LABEL 35
jump 98
!
@LABEL 36
note "1200 bps (V110) で接続中" 2
!note "Communicating at 1200 bps (V110)." 2
CommunicatingAt 1200
jump 58
!
@LABEL 37
note "2400 bps (V110) で接続中" 2
!note "Communicating at 2400 bps (V110)." 2
CommunicatingAt 2400
jump 58
!
@LABEL 38
note "4800 bps (V110) で接続中" 2
!note "Communicating at 4800 bps (V110)." 2
CommunicatingAt 4800
jump 58
!
@LABEL 39
note "9600 bps (V110) で接続中" 2
!note "Communicating at 9600 bps (V110)." 2
CommunicatingAt 9600
jump 58
!
@LABEL 40
note "19200 bps (V110) で接続中" 2
!note "Communicating at 19200 bps (V110)." 2
CommunicatingAt 19200
jump 58
!
@LABEL 41
note "38400 bps (V110) で接続中" 2
!note "Communicating at 38400 bps (V110)." 2
CommunicatingAt 38400
jump 58
!
!
@LABEL 58
! set the serial port handshake options for CTS
HSReset 0 1 0 0 0 0
!
! Connection established. In ORIGINATE mode pause before exit.
!
ifANSWER 59
pause 30
@LABEL 59
exit 0
!
! @ANSWER
! Set the modem to answer on 1st ring - label range is 61-70
!
@LABEL 62
matchclr
matchstr 1 32 "OK¥13¥10"
write "ATS0=1¥13"
matchread 30
jump 71
!
!
@LABEL 68
ifORIGINATE 32
! claim the serial port
userhook 1
note "電話に応対しています。" 2
!note "Answering phone..." 2
jump 32
!
!
! error messages - label range is 71-100
!
! Modem Not Responding
@LABEL 71
exit -6019
!
! No Dial Tone
@LABEL 72
exit -6020
!
! No Carrier or Error
@LABEL 73
exit -6021
!
! Busy
@LABEL 74
exit -6022
!
! No Answer
@LABEL 75
exit -6023
!
! Invalid Varstring Value
@LABEL 76
exit -6027
!
! DELAYED
@LABEL 77
exit -6022
!
! BLACKLISTED
@LABEL 78
exit -6022
!
!
! On Hook Modem
@LABEL 98
settries 0
HSReset 0 0 0 0 0 0
note "電話を切っています。" 2
!note "Disconnecting phone..." 2
matchclr
matchstr 1 99 "OK¥13¥10"
pause 10
write "+++"
matchread 15
!
@LABEL 99
matchclr
matchstr 1 32 "NO CARRIER¥13¥10"
matchstr 2 32 "OK¥13¥10"
matchstr 3 32 "ERROR¥13¥10"
pause 3
write "ATH¥13"
matchread 30
inctries
iftries 3 71
DTRSet
pause 5
DTRClear
pause 5
DTRSet
flush
jump 98
!
!
! Hang up the modem - label range is 101-120
!
@HANGUP
@LABEL 102
settries 0
HSReset 0 0 0 0 0 0
!
@LABEL 105
!
! Try to get control of the modem.
!
matchclr
matchstr 1 108 "OK¥13¥10"
pause 10
write "+++"
matchread 15
!
@LABEL 108
!-------------------
! secondly try ATH
!-------------------
matchclr
matchstr 1 111 "NO CARRIER¥13¥10"
matchstr 2 111 "OK¥13¥10"
matchstr 3 111 "ERROR¥13¥10"
pause 3
write "ATH¥13"
matchread 30
inctries
iftries 3 71
!---------------------------------------
! finaly try On-to-Off DTR transitions
!---------------------------------------
DTRSet
pause 5
DTRClear
pause 5
DTRSet
flush
jump 105
!
! recall the factory settings.
!
@LABEL 111
pause 15
matchclr
matchstr 1 114 "OK¥13¥10"
write "AT&F1S0=0¥13"
matchread 30
jump 71
!
@LABEL 114
exit 0
!
! labels 121-128 are reserved for future emergency hacks
!